package com.hopes.bizz.close.statistic.vo;

import com.hopes.bizz.close.common.constant.enums.ParkCloseSysDictEnum;
import com.hopes.boss.admin.api.resolver.DictResolver;
import lombok.Data;

import java.io.Serializable;

/**
 * @author yumr
 * @ProjectName bizz
 * @Description 危险品类型数量VO
 * @time 2024/2/16 22:21
 */
@Data
public class GoodsTypeNumVO implements Serializable {

    private static final long serialVersionUID = 1609129295627094549L;

    /**
     * 危险品类型
     */
    private Integer type;

    /**
     * 入库数量
     */
    private Double enterNum;

    /**
     * 出库数量
     */
    private Double outerNum;


    public GoodsTypeNumVO(Integer type, Double enterNum, Double outerNum) {
        this.type = type;
        this.enterNum = enterNum;
        this.outerNum = outerNum;
    }

    public Double getTotalNum() {
        return this.enterNum + this.outerNum;
    }

    public String getTypeStr() {
        return DictResolver.getItemLabelByValue(ParkCloseSysDictEnum.close_flow_bill_hazard_type, this.getType());
    }
}
